package RLK_NIO;

public class Example_01 {
    public void channelData(final FileInputStream stream, final byte[] data) {
        try {
            DatagramChannel ch = DatagramChannel.open(); // Resource allocated
            ch.configureBlocking(true);
            ByteBuffer packet = ByteBuffer.wrap(data);
            ch.send(packet, dest);
            ch.close();
        } catch (IOException e) {
            System.err.println(e.getMessage());
        }
    }
}
